mainApp.service('RequestUserService', ['Restangular', function (Restangular) {

	//微信快速注册
    this.wechatsBind = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "wechatsBind", params);
    }
    //获取企业的组织架构
    this.getOrganiztionList = function (params) {
        return Restangular.one("PersonnelSelector").customPOST({ name: "My Message" }, "getOrganiztionList", params);
    }
	//重置密码
    this.resetPwd = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "resetPwd", params);
    }
    //微信绑定系统账号
    this.wechatBindings = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "wechatBindings", params);
    }
    //微信登录验证
    this.wechatlogin = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "wechatLogin", params);
    }

    //验证码
    this.verifyCode = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "verifyCode", params);
    }
    //用户登录
    this.login = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "login", params);
    }
    //验证帐号是否存在
    this.isAccount = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "isAccount", params);
    }
    //发送短信验证码
    this.sendSMS = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "sendSMS", params);
    }
    //注册
    this.register = function (params) {
        return Restangular.one("/ApiUser/").customGET("register", params);
    }
    //发送短信验证码
    this.sendEmail = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "sendEmail", params);
    }
    //邮箱激活验证
    this.active = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "active", params);
    }
    //短信重置密码
    this.verifySMS = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "verifySMS", params);
    }
    //用户修改密码
    this.updatePwd = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "updatePwd", params);
    }
    // token登录验证
    this.ssoLoginTokenVerification = function (params) {
        return Restangular.one("ApiUser").customPOST({ name: "My Message" }, "ssoLoginTokenVerification", params);
    }
    //查询当前企业的信息
    //orgId  当前登录人的企业id
    this.findOrgInfo = function (params) {
        return Restangular.one("/organizationInfo").customPOST({ name: "My Message" }, "findOrgInfo", params);
    }
    // 学员注册接口
    this.studentRegister = function (params) {
        return Restangular.one("/ApiUser").customPOST({ name: "My Message" }, "studentRegister", params);
    }
} ]);
